package com.heima.wemedia.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsDto;
import com.heima.model.wemedia.dtos.WmNewsPageReqDto;
import com.heima.model.wemedia.pojos.WmNews;
import net.sourceforge.tess4j.TesseractException;

import java.io.IOException;

public interface WmNewsService extends IService<WmNews> {

    /**
     * 查询文章
     * @param dto
     * @return
     */
    public ResponseResult findAll(WmNewsPageReqDto dto);
    /**
     *  发布文章或保存草稿
     * @param dto
     * @return
     */
    public ResponseResult submitNews(WmNewsDto dto) throws TesseractException, IOException;

    ResponseResult findOne(Integer id);

    ResponseResult downOrUp(WmNewsDto dto);

    ResponseResult delNews(Integer id);

    Integer countByChannelId(Integer id);

    ResponseResult findListVo(WmNewsDto dto);

    ResponseResult findOneVo(Integer id);

    ResponseResult authFail(WmNewsDto dto);

    ResponseResult authPass(WmNewsDto dto);
}